const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
    transpileDependencies: true,
    lintOnSave: false,//关闭语法检查
    publicPath: '/',
    outputDir: 'dist',
    assetsDir: 'assets',
    indexPath: 'index.html',
    filenameHashing: true,
    productionSourceMap: false,
    crossorigin: undefined, //
    integrity: false,
    parallel: require('os').cpus().length > 1,
    css: {
        // loaderOptions: {
        //     less: {
        //         lessOptions: {
        //         modifyVars: {
        //             'primary-color': '#1DA57A',
        //             'link-color': '#1DA57A',
        //             'border-radius-base': '2px',
        //         },
        //         javascriptEnabled: true,
        //         },
        //     },
        // },
    },
    devServer: {
        client: {
            overlay: false,
        },
    },
    chainWebpack: (config) => {
        config.plugin('define').tap((definitions) => {
          Object.assign(definitions[0], {
            __VUE_OPTIONS_API__: 'true',
            __VUE_PROD_DEVTOOLS__: 'false',
            __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false'
          })
          return definitions
        })
    }
})